{% extends 'base.html' %}
{% load static %}

{% block title %}注册{% endblock %}
{% block head %}
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>  <!-- 引入 jQuery -->
    <script src="{% static 'js/get_code.js' %}"></script>
{% endblock %}

{% block main %}
    <div class="m-auto" style="max-width: 330px">
        <h1 class="text-center">请注册</h1>
        <form ACTION=" " METHOD="post">
             {% csrf_token %}
            <div class="mb-3">
                <label for="username" class="form-label">用户名</label>
                <input type="text" class="form-control" id="username" name="username" placeholder="用户名">
            </div>
            <div class="mb-3">
                <label for="exampleInputEmail1" class="form-label">邮箱</label>
                <input type="email" class="form-control" id="exampleInputEmail1" name="email" placeholder="邮箱">

            </div>
            <div class="mb-3">
                <label class="form-label">验证码</label>
                <div class="input-group mb-3">
                    <input type="text" class="form-control" name="code" placeholder="验证码">
                    <button class="btn btn-outline-secondary" type="button" id="get-code">获取验证码</button>
                </div>

            </div>
            <div class="mb-3">
                <label for="exampleInputPassword1" class="form-label">密码</label>
                <input type="password" class="form-control" id="exampleInputPassword1" name="password" placeholder="密码">
            </div>

            <button type="submit" class="btn btn-primary w-100">立即注册</button>
        </form>
    </div>
{% endblock %}

